

from xmlrpclib import ServerProxy

# note that the name lookups on Windows are very, very slow. best to use IP if possible
#ROS_MASTER_URI = "http://10.0.2.7:11311"
ROS_MASTER_URI = "http://tyler-XPS-M1530:11311"


def main():
    master = ServerProxy(ROS_MASTER_URI)
    
    # query master state
    (code, msg, values) = master.getSystemState('/')
    print(code, msg, values)
    
    # query param server variables
    names = master.getParamNames('/')
    print(names)
    print(master.getParam('/','/rosversion'))
    print(master.getParam('/','/rosdistro'))

if __name__ == "__main__":
    main() 